
#include "customer.h"
#include "member.h"
#include "n_member.h"
#include <map>

class accounts_admin
{
private:
	static accounts_admin *instance;
	accounts_admin();

	// Michael
	int members_counter;
	int n_members_counter;
	map<int,member> members;
	map<int,n_member> n_members;

public:
	// Singleton Pattern
	static accounts_admin * get_accounts_admin();

	bool check_availability(int phone);
	customer *get_tenant(int phone);  // Implement !

	// Michael
	bool add_m(string name_ , int phone_ , string address_ , string email_ , int credit_card_);
	bool add_n(string name_ , int phone_);
	void delete_m(int phone_);
	void delete_n(int phone_);
	bool search_m(int phone_);
	bool search_n(int phone_);
	void update_account(string name_ ,int phone_ , string address_ , string email_ , int credit_card_);
	~accounts_admin(void);
};